package com.lili.setting.service.impl;

import com.lili.model.setting.Menu;
import com.lili.setting.mapper.MenuMapper;
import com.lili.setting.service.MenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Arrays;

@Service
@SuppressWarnings("all")
public class MenuServiceImpl implements MenuService {

    @Autowired
    private MenuMapper menuMapper;

    @Override
    public void saveMenu(Menu menu) {
        menuMapper.insert(menu);
    }

    @Override
    public void deleteMenu(String[] ids) {
        // 根据id批量删除菜单权限信息
        menuMapper.deleteBatchIds(Arrays.asList(ids));
    }
}
